import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import WindiCSS from 'vite-plugin-windicss'

import AutoImport from 'unplugin-auto-import/vite'
import Components from 'unplugin-vue-components/vite'
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'


// import path from "path"

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    vue(),
    WindiCSS(),
    AutoImport({
      resolvers: [ElementPlusResolver()],
    }),
    Components({
      resolvers: [ElementPlusResolver()],
    }),
  ],

  // build: {
  //   rollupOptions: {
  //     output: {
  //       manualChunks: {
  //         'group-user': [
  //           './src/UserDetails',
  //           './src/UserDashboard',
  //           './src/UserProfileEdit',
  //         ],
  //       },
  //   },
  // },
  // server:{
  //   proxy:{
  //     '/api':{
  //       target:'http://ceshi13.dishait.cn',
  //       changeOrigin:true,
  //       rewrite: (path) => path.replace(/^\/api/, '')
  //     }
  //   }
  // }
})
